//
//  FPMainTopTableViewCell.m
//  FilmParadise
//
//  Created by lanou3g on 15/7/13.
//  Copyright (c) 2015年 DLYgroup. All rights reserved.
//

#import "FPMainTopTableViewCell.h"

@implementation FPMainTopTableViewCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier array:(NSMutableArray *)array index:(NSInteger)index
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.visual = [[FPVisualEffectView alloc]init];
        [self.visual sd_setImageWithURL:[array objectAtIndex:index] placeholderImage:[UIImage imageNamed:@"2.jpg"]];
        
        self.visual.frame = CGRectMake(0, 0, kScreenWidth, kScreenHeight / 3 * 2);
        
        
        [self.contentView addSubview:_visual];
        
        //初始化Carousel
        self.carousel = [[iCarousel alloc]initWithFrame:CGRectMake(0, 64, kScreenWidth, kScreenHeight / 2 )];
        
        self.carousel.type = iCarouselTypeInvertedTimeMachine;
      
        [self.contentView addSubview:_carousel];

        self.Titlelabel = [[UILabel alloc]initWithFrame:CGRectMake(kImageW(10) ,kImageH(400) ,kScreenWidth - kImageW(20),kImageH(30))];
        self.Titlelabel.textAlignment = 1;
        self.Titlelabel.font = [UIFont systemFontOfSize:kImageW(20)];
        self.Titlelabel.textColor = [UIColor whiteColor];
        [self.contentView addSubview:_Titlelabel];
        
        self.tapbtn = [UIButton buttonWithType:UIButtonTypeSystem];
        self.tapbtn.frame = CGRectMake(kImageW(135) ,kImageH(430),kImageW(100) ,kImageH(30) );
        self.tapbtn.layer.masksToBounds = YES;
        [self.tapbtn.layer setCornerRadius:kImageW(15)];
        self.tapbtn.backgroundColor = [UIColor purpleColor];
        [self.tapbtn setTitle:@"查看影讯" forState:UIControlStateNormal];
        [self.tapbtn setTintColor:[UIColor whiteColor]];
        [self.contentView addSubview:_tapbtn];
        
        self.ImageTypeBtn = [UIButton buttonWithType:UIButtonTypeSystem];
        self.ImageTypeBtn.frame = CGRectMake(kImageW(5), _tapbtn.y - kImageH(5), kImageW(50), kImageH(50));
        [self.ImageTypeBtn setBackgroundImage:[UIImage imageNamed:@"near-me-vector"] forState:UIControlStateNormal];
        self.ImageTypeBtn.layer.cornerRadius = 25;
        
        self.ImageTypeBtn.backgroundColor = [UIColor yellowColor];
        [self.contentView addSubview:_ImageTypeBtn];
        
        
        
        self.wordlbl = [[UILabel alloc]initWithFrame:CGRectMake(kImageW(20) ,kImageH(470) ,kScreenWidth - kImageW(40),kImageH(25))];
        self.wordlbl.textColor = [UIColor purpleColor];
        self.wordlbl.font = [UIFont systemFontOfSize:kImageW(14)];
        self.wordlbl.textAlignment = 1;
        self.wordlbl.text = @"为了拯救童话世界而展开的亲子大战";
        [self.contentView addSubview:_wordlbl];
}
    return self;
    
}








- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
